home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 796 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: willer@carolian.com (Steve Willer)
  3. Newsgroups: comp.std.c++
  4. Subject: A couple of questions about strings
  5. Date: 20 Mar 1996 22:11:25 GMT
  6. Organization: Carolian Systems, Toronto ON
  7. Sender: news@sq.com (News Administrator)
  8. Approved: clamage@eng.sun.com (comp.std.c++)
  9. Message-ID: <3150756f.168603020@sqarc.sq.com>
  10. NNTP-Posting-Host: taumet.eng.sun.com
  11. X-Newsreader: Forte Agent .99d/32.182
  12. Originator: clamage@taumet
  13.  
  14. I'm probably beating a dead horse here, but I had a couple of
  15. questions about the strings class (at least, the one in the April WP).
  16. Specifically, there are two design decisions that I don't understand.
  17.  
  18. a) Why does basic_string::copy() not also copy an ending '\0'? If
  19. there's some sort of good reason, why wasn't a function added that did
  20. this (perhaps basic_string::copy_null() or something)? I must say, it
  21. is very inconvenient to copy a string to a C-style array of chars with
  22. the current string class.
  23.  
  24. b) I don't see any reason why basic_string::copy() is not a const
  25. function. Any particular reason for that one?
  26.  
  27.  
  28.  
  29. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  30. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  31. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  32. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  33. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  34.